package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatBom;
import com.indusfo.spc.pojo.MatBom;
import com.indusfo.spc.pojo.MatDete;
import com.indusfo.spc.pojo.MatFlow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/22 13:57
 * @Version 1.0
 */

public interface MatBomMapper {

    /**
     * 新增
     */
    int insertMatBom(MatBom matBom);

    /**
     * 修改
     */
    int updateMatBom(MatBom matBom);

    /**
     * 查询
     */
    List<MatBom> queryMatBom(MatBom matBom);

    /**
     * 条数
     */
    int countMatBom(MatBom matBom);

    /**
     * 去重
     */
    int checkMatBom(MatBom matBom);

    /**
     * 删除
     */
    int deleteMatBom(@Param("matBomIds") List<Integer> matBomIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<MatBom> queryMatBomByMatFlowId(@Param("matFlowId") Integer matFlowId);

    /**
     * 级联删除
     */
    int deleteMatBomByMatBomId(@Param("matBomId") Integer matBomId, @Param("dataState") Integer dataState);

    List<MatBom> queryMatBomByMatFlowList(@Param("matFlowList") List<MatFlow> matFlowList);

}